﻿@model mvcForum.Web.ViewModels.TopicViewModel
@using mvcForum.Web.Helpers;
@{
	ViewBag.Title = ForumHelper.GetString("Topic.Title", new { Title = Model.Title });

	Layout = Url.GetThemeBaseUrl() + "areas/forum/views/shared/forumlayout.cshtml";
}
	<!-- Views/Topic/Index.aspx -->
@Html.Partial("Breadcrumb", Model.Path)

	<span class="pull-right muted">@ForumHelper.GetString("CurrentTime", new object[] { DateTime.UtcNow })</span>

	<h2>@Model.Title</h2>
	<hr />

@if (TempData["Feedback"] != null) {
	 <ul class="list-unstyled">
	 @foreach (var text in (IEnumerable<MvcHtmlString>)TempData["Feedback"]) {
		<li>@text</li>
	}
	 </ul>
}

@Html.Partial("TopicButtonsPartial", Model)
@Html.Partial("TopicPagingPartial", Model)
	<table class="table posts">
		<tbody>
@foreach (var message in Model.Posts) {
	 @Html.Partial("MessagePartial", message)
}
		</tbody>
	</table>
@Html.Partial("QuickReply", new mvcForum.Web.ViewModels.Create.QuickReplyViewModel { TopicId = Model.Id })

@Html.Partial("TopicButtonsPartial", Model)
@Html.Partial("TopicPagingPartial", Model)
@if (ForumHelper.Debug) {
<!-- For Selenium Test -->
<div id="forum_topic_index" style="display: none;"></div>
}
@Html.Partial("Breadcrumb", Model.Path)
